package ;

import scuts.Core;
import scuts.ListMake;

using scuts.Core;
import scuts.F;

typedef F1<T> = {
	public function hasNext ():T;
}

class Main
{
  
	static function main () {
		
		
		PrinterMacro.printTypeOfExpr(ListMake.mk(1, 2, 3));
		
		PrinterMacro.printTypeOfExpr(ListMake.mk(ListMake.mk([1], [2], [3])));
		
		PrinterMacro.printTypeOfExpr(function (x,a) return x+a);
		PrinterMacro.printTypeOfExpr(F.n(x, a = x+a));
		
		PrinterMacro.printTypeOfExpr([ { name:"Peter", age:10, ids:[1,2,3] } ]);
		
		PrinterMacro.printTypeOfExpr([[0, 1], [2], [3]]);
		PrinterMacro.printTypeOfExpr(function (a:Int) return Std.string(a) );
		PrinterMacro.printTypeOfExpr(function (a, b) return a );
		PrinterMacro.printTypeOfExpr(foo );
		PrinterMacro.printTypeOfExpr(foo2 );
		PrinterMacro.printTypeOfExpr( { foo: "bar", has : function () return 1 } );
		var c:F1<Bool> = 0...10;
		PrinterMacro.printTypeOfExpr( c );
		PrinterMacro.printTypeOfExpr( 0...10 );
		PrinterMacro.printTypeOfExpr( optional );
		PrinterMacro.printTypeOfExprWithSimpleFS( optional );
		var u:Dynamic = 1;
		
		PrinterMacro.printTypeOfExpr( u );
		
		var u:Dynamic<String> = { foo : "bar" };
		
		PrinterMacro.printTypeOfExpr( u );
		
		
	}
	
	static function foo <A, B> (a:A, b:B):A 
	{
		return a;
	}
	
	static function foo2 <A, B> (a:A, b:B, c:Int):A 
	{
		return a;
	}
	
	static function optional (?a:Int = 4, ?b:String):Int 
	{
		return a;
	}
	
	
}
